package com.project.mapper;

import com.project.bean.ChannelBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface IChannelMapper {
    @Select("SELECT c.*,COUNT(fk_channelId) FROM t_channel c,t_postings p " +
            "WHERE pk_channelId=fk_channelId  GROUP BY fk_channelId ")
    @ResultMap("channelMap")
    public List<ChannelBean> findAll();
}
